package br.iars.web.model.entity;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name="item")
@AttributeOverride( name="id", column = @Column(name="item_id") )
public class Item extends GenericEntity<Long> {

	private static final long serialVersionUID = 480557391497431034L;
	
	@Column(name = "description", nullable = false)
	private String description;

	public Item() {
		super();
	}

	public Item(Long id) {
		super(id);
	}

	public Item(Long id, String description) {
		super(id);
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String toString() {
		return "Item [description=" + description + ", id=" + getId() + "]";
	}

}
